package collage.aminpage;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;

public class Info_Panel extends JPanel{


	public Info_Panel() {
	
	makeCategori();
	
	
	
	}

	
	private void makeCategori(){
		
		JButton departs = new JButton("학과 정보");
		departs.addActionListener( new ActionListener() {
			
			@Override
			public void actionPerformed(ActionEvent e) {
				
				viewDepartsLabel( true );
				JButton stuinfo = new JButton( "학생정보 ");
				add(stuinfo);
			}
		});

	add( departs );	
		
	}
	
	private void viewDepartsLabel( boolean check ){
		
		JButton proinfo = new JButton( "교수 정보");
		JLabel useclass = new JLabel( "강의실 정보");
		JLabel diary = new JLabel( "학사 일정");
		JLabel stuinfo = new JLabel( "학생 정보");
		
		if ( check ){
			add(proinfo);
			add(useclass);
			add(diary);
			add(stuinfo);
			
			
		}
		
		
		
	}
	
	

} // class

